package com.czwj.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.czwj.dao.CameraMapper;
import com.czwj.entities.Camera;
import com.czwj.service.CameraService;

/**
* @ClassName: CameraServiceImpl
* @Description: TODO
* @author H
* @date 2020年5月19日
*
*/
@Service
public class CameraServiceImpl implements CameraService{
	@Resource
	CameraMapper mapper;

	/** 
	* 
	* @param map
	* @return
	* @see com.czwj.service.CameraService#search(java.util.Map)
	*/
	@Override
	public List<Camera> search(Map<String,Object> map){
		// TODO Auto-generated method stub
		return this.mapper.search(map);
	}

	/** 
	* 
	* @param map
	* @return
	* @see com.czwj.service.CameraService#count(java.util.Map)
	*/
	@Override
	public int count(Map<String,Object> map){
		// TODO Auto-generated method stub
		return this.mapper.count(map);
	}

	/** 
	* 
	* @param item
	* @return
	* @see com.czwj.service.CameraService#update(com.czwj.entities.Camera)
	*/
	@Override
	public int update(Camera item){
		// TODO Auto-generated method stub
		return this.mapper.updateByPrimaryKeySelective(item);
	}

	/** 
	* 
	* @param item
	* @return
	* @see com.czwj.service.CameraService#insert(com.czwj.entities.Camera)
	*/
	@Override
	public int insert(Camera item){
		// TODO Auto-generated method stub
		return this.mapper.insertSelective(item);
	}

	/** 
	* 
	* @param id
	* @return
	* @see com.czwj.service.CameraService#delete(java.lang.Integer)
	*/
	@Override
	public int delete(Integer id){
		// TODO Auto-generated method stub
		return this.mapper.deleteByPrimaryKey(id);
	}

	/** 
	* 
	* @param id
	* @return
	* @see com.czwj.service.CameraService#selectByPrimaryKey(int)
	*/
	@Override
	public Camera selectByPrimaryKey(int id){
		// TODO Auto-generated method stub
		return this.mapper.selectByPrimaryKey(id);
	}

	/** 
	* 
	* @param map
	* @return
	* @see com.czwj.service.CameraService#searchforuser(java.util.Map)
	*/
	@Override
	public List<Camera> searchforuser(Map<String,Object> map){
		// TODO Auto-generated method stub
		return this.mapper.searchforuser(map);
	}

	/** 
	* 
	* @param map
	* @return
	* @see com.czwj.service.CameraService#countforuser(java.util.Map)
	*/
	@Override
	public int countforuser(Map<String,Object> map){
		// TODO Auto-generated method stub
		return this.mapper.countforuser(map);
	}
}
